/*
 * Description: description of style.js
 * Company: 联宝（合肥）电子科技有限公司
 * Author: Dongxu.Ni
 * Date: 2020/4/6 17:57
 */

const state = {
  leftCollapse: false,
  leftWidth: '260px'
}

const getters = {
  getLeftWidth: state => state.leftWidth,
  getLeftCollapse: state => state.leftCollapse
}

const mutations = {
  SET_LEFT_COLLAPSE: (state, leftCollapse) => {
    state.leftCollapse = leftCollapse
    if (leftCollapse) {
      state.leftWidth = '64px'
    } else {
      state.leftWidth = '260px'
    }
  }
}

const actions = {}

export default {
  namespaced: true,
  state,
  getters,
  mutations,
  actions
}
